package nuc.lizongze.backend.controller;

import nuc.lizongze.backend.service.ItemParamService;
import nuc.lizongze.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/backend/itemParam")
public class ItemParamController {

    @Autowired
    ItemParamService itemParamService;
    @RequestMapping("/selectItemParamByItemCatId/{itemCatId}")
    Result selectItemParamByItemCatId(@PathVariable("itemCatId") Long itemCatId){
        try{
            return itemParamService.selectItemParamByItemCatId(itemCatId);
        }catch (Exception e){
            e.printStackTrace();
        }
        return Result.build(500,"error");
    }
}
